/**
 * taskconstraintfactory.h is part of cbs-framework.
 *
 * cbs-framework is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * cbs-framework is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with cbs-framework.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef TASKCONSTRAINTFACTORY_H
#define TASKCONSTRAINTFACTORY_H

#include "../definitions.h"

#define GET_TASK_CONSTRAINT_FACTORY() ( TaskConstraintFactory::Instance() )

// Forward declarations.
class TaskLenghtConstraint;
class TaskTimeWindowConstraint;
class TaskResourcesNeededConstraint;

class TaskConstraintFactory
{
public:

    ~TaskConstraintFactory() {}

    static TaskConstraintFactory & Instance();

    TaskLenghtConstraint * CreateTaskLenghtConstraint( tTime a_lenght = MIN_TIME );

    TaskTimeWindowConstraint * CreateTaskTimeWindowConstraint( tTime a_start = MIN_TIME, tTime a_end = MAX_TIME );

    TaskResourcesNeededConstraint * CreateTaskResourcesNeededConstraint( tNeededResources a_neededResources );

private:

    static TaskConstraintFactory m_instance;

    // Protect default constructor.
    TaskConstraintFactory() {}

    // Protect default copy constructor.
    TaskConstraintFactory( const TaskConstraintFactory & a_other );

    // Protect default operator =.
    TaskConstraintFactory & operator = ( const TaskConstraintFactory & a_other );

};

#endif // TASKCONSTRAINTFACTORY_H
